/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.comac.ins.isfd.domain.bo.IsfdOperatorBo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 算子实体类
 *
 * @author hxloongs
 * @date 2024-7-8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@AutoMapper(target = IsfdOperatorBo.class)
@CollectionName(value = "operator_list")
public class IsfdOperator {

    @ID
    private String _id;

    @CollectionField("operator_name")
    private String operatorName;

    @CollectionField("algorithm_realize")
    private String algorithmRealize;

    @CollectionField("operator_description")
    private String operatorDescription;

    @CollectionField("application_type")
    private String applicationType;

    @CollectionField("material_type")
    private String materialType;

    @CollectionField("algorithm_type")
    private String algorithmType;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @CollectionField("calculate_object")
    private List<CalculateObject> calculateObjects;

    @Data
    public static class CalculateObject {
        @CollectionField("object_type")
        private String objectType;
        @CollectionField("object_name")
        private String objectName;
    }

    /**
     * 元数据管理id
     */
    @CollectionField("metadata_management_id")
    private String metadataManagementId;
}
